Skip to content

Add tests for untested Date and DateTime behavior - #206

Merged
jeremyevans merged 1 commit into
ruby:masterfrom
wtn:coverage
Nov 14, 2026
Merged

jeremyevans merged 1 commit into
ruby:masterfrom
wtn:coverage

Conversation

@wtn

@wtn wtn commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

These pass on the C extension and fail with the Ruby implementation in #155 at fe084e5.

  • <=>, ==, eql?, hash and - between DateTimes with different offsets
  • rfc2822 and httpdate for a DateTime at +09:00
  • hash for dates that differ only in start
  • Date#year after clone(freeze: true)
  • loading a C Marshal dump of Date.new(-123456,7,8)
  • October 1582: Date.new(1582,9,10) >> 1 and negative days such as Date.civil(1582,10,-18)
  • an out-of-range start is replaced with Date::ITALY
  • >> and << raise TypeError for nil and a String
  • _parse returns a nil offset for +24:00 and +12:60, and no _comp key for 'JAN-1999'
  • strptime with text after the format, and with '%Y %a'
  • jisx0301 for a Reiwa year of 100

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
@wtn
wtn force-pushed the coverage branch 2 times, most recently from bd651ec to 3f36a1d Compare November 14, 2026 16:25

@jeremyevans jeremyevans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch.

@jeremyevans
jeremyevans merged commit 6f788dd into ruby:master Nov 14, 2026
30 checks passed
@wtn
wtn deleted the coverage branch November 14, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants